using System;
using System.Collections;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using Nsb.Classes;

namespace Minions.Classes
{
    [IgnoreNamespace]
    public class MiCanvas
    {
        private MiCanvasData _canvasData;

        public MiCanvas(MiCanvasData cd)
        {
            if (cd == null)
                cd = new MiCanvasData();
            SetData(cd);
        }

        #region Finders
        #endregion Finders

        #region Properties

        public MiCanvasData CanvasData
        {
            get { return _canvasData; }
        }

        #endregion Properties

        #region Evokes

        public void RemFromCanvas(Evo evo)
        {
            Minion mm = (Minion) evo.Value;
            Type.DeleteField(_canvasData.minion, mm.Id);
        }

        #endregion Evokes

        #region Chains

        public MiCanvas SetData(MiCanvasData data)
        {
            Debug.Assert(data != null, "canvas data not null");
            _canvasData = data;
            return this;
        }

        #endregion Chains

        #region Methods
        #endregion Methods
    }

    public sealed class MiCanvasData
    {
        // ReSharper disable InconsistentNaming
        public string build;
        public Dictionary css = new Dictionary();
        public string curate;
        public int embedGap;
        public bool hasBackground;
        public int interval = 5000;
        public string load;
        public string loadCss;
        public MinionData minion;
        public int slide;
        public string style;
        // ReSharper restore InconsistentNaming
    }
}